package com.lcubigdata.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;

import java.time.LocalDateTime;

/**
 * 用户信息
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private  Integer id;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private String username;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private String password;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private String name;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Integer age;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    // 添加一个带参数的构造器
//    public User(Integer id, String username, String password, String name, Integer age, LocalDateTime updateTime) {
//        this.id = id;
//        this.username = username;
//        this.password = password;
//        this.name = name;
//        this.age = age;
//        this.updateTime = updateTime;
//    }

}
